package com.wd.tech.contract;

import com.wd.tech.bean.AddCommunityGreatBean;

import java.util.HashMap;
import org.jetbrains.annotations.Contract;

import java.util.Map;

import okhttp3.RequestBody;
import retrofit2.http.QueryMap;

/**
 * 时间：2020/7/1
 * 作者：徐黎明
 * 类的作用：
 */
public interface IContract {
     interface IModel{
         //登录注册
        void IModelRegisterInfo(String url, Map<String, Object> map, Class cls, ModelCallBack CallBack);
        //社区列表
        void IModelCommunityInfo(String url,Map<String, Object> map,  Class cls, ModelCallBack CallBack);
        //点赞
         void IModelAddCommunity(String url, Map<String, Object> map,Class cls, ModelCallBack CallBack);
         //取消点赞
         void IModelCancleAdd(String url,  Map<String, Object> map , Class cls, ModelCallBack CallBack);
         //发布帖子
         void IModelReleasePost(String url,Map<String, RequestBody> map,  Class cls, ModelCallBack CallBack);
         void IModelReleasePost(String url,HashMap<String, RequestBody> map,  Class cls, ModelCallBack CallBack);
         //查询banner
         void ModelGetXBannerInfo(String url, Class cls, ModelCallBack callBack);
         //展示资讯首页
         void ModelGetNewsShow(String url, Map<String ,Object>map,Class cls, ModelCallBack callBack);
         //展示兴趣频道
         void ModelGetChannel(String url,Class cls,ModelCallBack callBack);
         //频道详情
         void ModelGetNewsChanner(String url, Map<String ,Object>map,Class cls, ModelCallBack callBack);
    }
     interface ModelCallBack<T>{
        void success(T t);
        void Error(Throwable throwable);
    }
     interface IView<T>{
        void success(T t);
        void Error(Throwable throwable);
    }
    interface IPresenter{
        void IModelRegisterInfo(String url, Map<String, Object> map, Class cls);
        //查询banner
        void PresenterGetXBannerInfo(String url, Class cls);
        //展示资讯首页
        void PresenterGetNewsShow(String url, Map<String ,Object>map,Class cls);
        //展示兴趣频道
        void PresenterGetChannel(String url,Class cls);
        //频道详情
        void PresenterGetNewsChanner(String url, Map<String ,Object>map,Class cls);
        void IModelCommunityInfo(String url, Map<String, Object> map,Class cls);
        void IModelAddCommunity(String url, Map<String, Object> map,Class cls);
        void IModelCancleAdd(String url, Map<String, Object> map, Class cls);
        void IModelReleasePost(String url, Map<String, RequestBody> map, Class cls);

    }
}
